<?php
    function functionName(){
        echo "我的名字是：夏丹成";
    }

    functionName();
echo "<br>";
echo "<hr>";
    function getNowTime($type){
        if ($type=="time"){
            echo date('Y-m-d H:i:s');
        }else if ($type=="day"){
            echo date('Y-m-d');
        }

    }
     getNowTime("time");
echo "<br>";
echo "<hr>";
    function getName($name){
        echo $name;
    }

    getName("夏丹成");
echo "<br>";
echo "<hr>";

/**
 * 多个参数且有返回值
 */

function plus(int $a,int $b){
        return $a+$b;
    }
  echo plus(1,4);
var_dump(plus(1,4));
    ?>